package cn.aitrox.ry.service.config.enumtype;

public enum DictRootCodeEnum {

    DEPARTMENT("A", "科室"),
    TASK_LABEL("B", "任务标签"),
    TASK_TARGET("C", "任务目标"),
    TASK_USES("D", "任务用途"),
    DISCARD_REASON("E", "废片原因"),
    WINDOWS("F", "窗宽窗位"),
    ALG_MODE_VERSION("G", "算法模型版本");

    private String code;

    private String desc;

    DictRootCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DictRootCodeEnum getEnumByCode(String code) {
        if(null == code) {
            return null;
        }
        for (DictRootCodeEnum codeEnum : DictRootCodeEnum.values()) {
            if(codeEnum.getCode().equals(code)) {
                return codeEnum;
            }
        }
        return null;
    }
}
